import { request } from '@/utils/request'

// 列出对战列表
export function list() {
  return request({
    url: '/v1/garage-kit/pk/list',
    method: 'GET'
  })
}

// 对战详情
export function loadDetail(data) {
  return request({
    url: '/v1/garage-kit/pk/detail',
    method: 'GET',
    data
  })
}

// 是否有等待中的对战
export function loadWaiting(data) {
  return request({
    url: '/v1/garage-kit/pk/waiting',
    method: 'GET',
    data
  })
}

// 列出对战记录
export function loadRecord(data) {
  return request({
    url: '/v1/garage-kit/pk/records',
    method: 'GET',
    data
  })
}

// 获取满单状态
export function loadFullState(data) {
  return request({
    url: '/v1/garage-kit/pk/full/state',
    method: 'GET',
    data
  })
}

// 取消对决
export function cancel(data) {
	return request({
		url: '/v1/garage-kit/pk/cancel',
		method: 'post',
		data
	})
}
